gridpack::parallel::TaskManager Class Reference
#include <task_manager.hpp>
List of all members.
Constructor & Destructor Documentation
gridpack::parallel::TaskManager::TaskManager |
( |
void |
|
) |
|
Constructor on world communicator
gridpack::parallel::TaskManager::TaskManager |
( |
Communicator & |
comm |
) |
|
gridpack::parallel::TaskManager::~TaskManager |
( |
void |
|
) |
|
Member Function Documentation
void gridpack::parallel::TaskManager::cancel |
( |
void |
|
) |
|
Set the task counter to the maximum value so that all subsequent calls to nextTask return false. NOTE: nextTask must be called at least once by any process that calls this function or the counter will hang
bool gridpack::parallel::TaskManager::nextTask |
( |
Communicator & |
comm, |
|
|
int * |
next | |
|
) |
| | |
Get the next task for the whole communicator. The same value of next is returned for all processors in the communicator comm. If the manager finds a task it returns true and next is set to the index of the task, otherwise it returns false and next is set to -1
- Parameters:
-
| comm | communicator for next task |
| next | index of next task |
- Returns:
- false if no other tasks are found
References gridpack::parallel::Communicator::getGroup(), and gridpack::parallel::Communicator::rank().
bool gridpack::parallel::TaskManager::nextTask |
( |
int * |
next |
) |
|
Get the next task from the task manager. If the manager finds a task it returns true and next is set to the index of the task, otherwise it returns false and next is set to -1
- Parameters:
-
- Returns:
- false if no other tasks are found
void gridpack::parallel::TaskManager::printStats |
( |
|
) |
|
Print out statistics on how tasks are distributed on processors
void gridpack::parallel::TaskManager::set |
( |
int |
ntasks |
) |
|
Specify total number of tasks and set task manager to zero
- Parameters:
-
| ntasks | total number of tasks |
The documentation for this class was generated from the following file: